package com.patMall.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;
import java.util.List;

/**
 * @Author 750909637@qq.com
 * @PackageName patMall
 * @Package com.patMall.entity
 * @Date 2024/1/18 22:33
 * @Version 1.0
 */
public class AnswerProblem {
    private Integer answerId; // 问答ID

    private String answerContent; // 内容

    private int isProblem; // 是否是问题

    private Integer answerProblemId; //回答问题的ID / 问题为null

    private Integer commodityId; // 商品ID
    private Integer userId;
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    private Date answerProblemTime;
    private List<AnswerProblem> answer; // 答案集合
    private User user; // 用户
    private Commodity commodity;

    public AnswerProblem() {
    }

    @Override
    public String toString() {
        return "AnswerProblem{" +
                "answerId=" + answerId +
                ", answerContent='" + answerContent + '\'' +
                ", isProblem=" + isProblem +
                ", answerProblemId=" + answerProblemId +
                ", commodityId=" + commodityId +
                ", userId=" + userId +
                ", answerProblemTime=" + answerProblemTime +
                ", answer=" + answer +
                ", user=" + user +
                ", commodity=" + commodity +
                '}';
    }

    public Integer getAnswerId() {
        return answerId;
    }

    public void setAnswerId(Integer answerId) {
        this.answerId = answerId;
    }

    public String getAnswerContent() {
        return answerContent;
    }

    public void setAnswerContent(String answerContent) {
        this.answerContent = answerContent;
    }

    public int getIsProblem() {
        return isProblem;
    }

    public void setIsProblem(int isProblem) {
        this.isProblem = isProblem;
    }

    public Integer getAnswerProblemId() {
        return answerProblemId;
    }

    public void setAnswerProblemId(Integer answerProblemId) {
        this.answerProblemId = answerProblemId;
    }

    public Integer getCommodityId() {
        return commodityId;
    }

    public void setCommodityId(Integer commodityId) {
        this.commodityId = commodityId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Date getAnswerProblemTime() {
        return answerProblemTime;
    }

    public void setAnswerProblemTime(Date answerProblemTime) {
        this.answerProblemTime = answerProblemTime;
    }

    public List<AnswerProblem> getAnswer() {
        return answer;
    }

    public void setAnswer(List<AnswerProblem> answer) {
        this.answer = answer;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Commodity getCommodity() {
        return commodity;
    }

    public void setCommodity(Commodity commodity) {
        this.commodity = commodity;
    }
}
